Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for meta-path-for-user propfind #2741

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Apr 13, 2022

This PR adds support for the meta-path-for-user prop in propfinds to the /dav/meta endpoint. This is needed in oC Web for following situations:
a) when no resource path but only its id is given in the browser URL, fetch the path to make a propfind afterwards
b) when a resource path and id is given in the browser URL but resolves to an outdated location (e.g. resource has been moved), fetch new path to make another propfind with the correct path afterwards

Based on outdated/closed #2321 and #1604

Spec can be found here: https://doc.owncloud.com/server/next/developer_manual/webdav_api/meta.html

An example request:
curl -u einstein:relativity --insecure -X PROPFIND -H "Depth: 0" -H "Content-Type: text/xml" --data "@meta-files.xml" 'https://localhost:9200/remote.php/dav/meta/ddc2004c-0977-11eb-9d3f-a793888cd0f8!aa07d86a-f564-4e26-9e36-632ef63df9f0' | xmllint --format -

with content of meta-files.xml being:

<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:" xmlns:oc="http://owncloud.org/ns">
    <a:prop>
        <oc:meta-path-for-user/>
    </a:prop>
</a:propfind>

@kulmann kulmann requested review from a team, labkode and ishank011 as code owners April 13, 2022 13:27
@update-docs

This comment was marked as resolved.

@phil-davis
Copy link
Contributor

phil-davis commented Apr 26, 2022

Now we just have: https://drone.cernbox.cern.ch/cs3org/reva/6755/16/6

  Scenario: User cannot access meta folder of a file which does not exist                                                                                                             # /drone/src/tmp/testrunner/tests/acceptance/features/apiVersions/fileVersions.feature:388
    Given user "Brian" has been created with default attributes and without skeleton files                                                                                            # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
When user "Brian" sends HTTP method "PROPFIND" to URL "/remote.php/dav/meta/MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU2OjhjY2QyNzUxLTkwYTQtNDBmMi1iOWYzLTYxZWRmODQ0MjFmNA==" # FeatureContext::userSendsHTTPMethodToUrl()
--
<span class="ansi-red-fg">      cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://revad-services:20080/remote.php/dav/meta/MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU2OjhjY2QyNzUxLTkwYTQtNDBmMi1iOWYzLTYxZWRmODQ0MjFmNA== (GuzzleHttp\Exception\ConnectException)</span>

Maybe the server code is "completely silent" if the request does not match any resource?
(and previously this passed - the server must have returned something - a 404 not found)

@micbar micbar force-pushed the propfind-meta-path-for-user branch from a71699e to 692c40e Compare April 27, 2022 20:03
@micbar micbar self-assigned this Apr 27, 2022
@micbar micbar requested a review from butonic April 27, 2022 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants